/*
-----------------------------------------------------------------------------
This source file is part of Labor3D
(Labor 3D Graphics Engine)

Copyright (c) 2009-2020 Rock Mao
* creator : Rock Mao
* created : 2010-5-31   14:45
* filename: LFPInStream.h

-----------------------------------------------------------------------------
*/

#ifndef __LFPINSTREAM_H__
#define __LFPINSTREAM_H__

#define _USE_COMPRESS
#include "../zlib/zlib.h"

class CLFilePack;
class CLFPInStream
{
	friend class CLFilePack;
protected:
	char *        m_pData;
	char*         m_pCompressData;
	unsigned int  m_nLength;
	unsigned int  m_nOriginLength;
	bool          m_bCompress;
	int           m_nCompressRate;

public:
	CLFPInStream();
	~CLFPInStream();

	char*         getUnCompressData();

	char*         getCompressData();
	int           compressData();
	int           unCompressData();

	unsigned int  getOriginLength() { return m_nOriginLength; }

protected:
	char*         getData();
	unsigned int  getLength();

};
#endif